package jtk.project4.fleet.ibatis.dao;

import java.sql.SQLException;
import java.util.List;

import jtk.project4.fleet.domain.Objects2;

public class Objects2Dao extends IbatisDao{

	public List selectObjects2() throws SQLException{
		List selectObjects2 = null;
		selectObjects2 = getSqlMap().queryForList("SELECT_ALL_OBEJCTS2",null);
		return selectObjects2;
	}
	
	public Objects2 insertObjects2(Objects2 obj2) throws SQLException{
		return (Objects2) getSqlMap().insert("INSERT_OBJECTS2", obj2);
	}
	public int updateObjects2(Objects2 obj2) throws SQLException{
		return (int) getSqlMap().update("UPDATE_OBJECTS2", obj2);
	}
	
	public int deleteObjects2(Objects2 obj2) throws SQLException{
		return (int) getSqlMap().delete("DELETE_OBJECTS2", obj2);
	}
	
	public static void main(String args[]) throws SQLException{
		
	//	List <Objects2> asm;
	//	asm = new Objects2Dao().selectObjects2();
	//	System.out.println(asm.size());
		
		Objects2 obj2;
		obj2 = new Objects2();
		//obj2.setCustLbl16("satudautiga");
		obj2.setObjectId(887);
		new Objects2Dao().deleteObjects2(obj2);
		//System.out.println(obj2.getObjectId());
		
	}
}
